package com.fanh.service.impl;


import com.fanh.dao.GuideLessonDao;
import com.fanh.model.GuideLesson;
import com.fanh.service.GuideReadHistoryService;
import com.github.pagehelper.PageHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("guideReadHistoryService")
public class GuideReadHistoryServiceImpl implements GuideReadHistoryService {

    private static final Logger LOGGER = LoggerFactory.getLogger(GuideReadHistoryServiceImpl.class);

    @Autowired
    private GuideLessonDao guideLessonDao;

    @Override
    public List<GuideLesson> guideReadHistory(String userId, String courseId, Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        return  guideLessonDao.readHistoryList(userId,courseId);

    }
}
